<%- set_header :robots=>'noindex,nofollow' %>
<h1 class="inline">
	<%= @queries.blank? ? 'No' : (@user ? whose_commands(@queries.first.user_command) : "All") %> 
	<%= "#{(@command || @user_command).keyword}" if @command || @user_command %>	
	queries
	<%= "tagged with '#{@tags.join("+").gsub("+", "' and '")}'" unless @tags.blank? %>
	<span class="pagination_description">(<%= pagination_description @queries %>)</span>
</h1>

<ul class="bolder options header">
	<% if logged_in? && !current_user? && @command.nil? %>
		<li class="search"><%= link_to 'Yours', (@tags.blank? ? user_queries_path(current_user) : user_tagged_queries_path(current_user, @tags)) %></li>
	<% end %>
	<% if @user %>
		<li class="search"><%= link_to 'All', (@tags.blank? ? queries_path : tagged_queries_path(@tags)) %></li>
	<% end %>
</ul>

<hr />

<%= query_table @queries, :table=>{:class=>'top_spaced'}, :columns=>[:user, :query_string, :user_command, :created_at]%>

<%= will_paginate @queries %>